<?php

class Default_HotelController extends Zend_Controller_Action
{
    public function indexAction()
    {
    	////// get langague ///////////////
    	$lang = Zend_Registry::get('lang');
    	
    	////// get param ///////////////////////
    	$countryId = $this->getRequest()->getParam("country",1);
    	$spotId = $this->getRequest()->getParam("spotId",0);
    	$regionId = $this ->getRequest()->getParam("regionId",0);
    	$cityId = $this->getRequest()->getParam("cityId",0);
    	$rate = $this->getRequest()->getParam("rate",0);
    	$page = $this->getRequest()->getParam("page",1);
    	$meeting = $this->getRequest()->getParam("meeting",0);
    	$db_hotel = new Default_Model_DbTable_Hotel();
    	$db_region = new  Default_Model_DbTable_Region();
    	$hotel = $db_hotel->getallhotel($lang, $countryId, $cityId, $regionId, $spotId, $rate,$meeting, $page);
    	
    	////// assign to client ////////
    	$this->view->region = $db_region->getregion($countryId,$lang);
    	$this->view->hotel = $hotel;
    	$this->view->regionId = $regionId;
    	$this->view->country = $countryId;
    	$this->view->cityId = $cityId;
    	$this->view->rate = $rate;    	
    }
}
?>